<template>
    <div>
        <h2>详情页-{{ $route.query.id }}</h2>
        <button @click="$router.back()">返回</button>
    </div>
</template>
<script setup>
import { onMounted } from 'vue';
import { useRoute } from 'vue-router'
const route = useRoute()


onMounted(() => {
    loadData()
})


const loadData = () => {
    console.log('ajax请求id=', route.query.id)
}

</script>
